<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>显示与隐藏</title>
</head>
<body>
<div id="app">
    <div v-if="isShow">123456</div>
    <iv v-else="isShow">你好啊lf</iv>
    <div v-show="isShow">abcde</div>


    <input type="button" @click="show1">显示
    <input type="button" @click="show2">隐藏
</div>

<script src="js/vue.js"></script>
<script>
    var vue = new Vue({
        el: "#app",
       data:{
            isShow:true,
       },
        methods:{
            show1(){
                this.isShow=true;

            },
            show2(){
                this.isShow=false;
            }
        }
    });
</script>
</body>
</html>